Fix GtkToolButton possibly being empty
authorOlivier Brunel <jjk@jjacky.com>
Mon, 14 Oct 2013 18:08:30 +0000 (20:08 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 16 Oct 2013 01:44:18 +0000 (21:44 -0400)
With style BOTH_HORIZ the label would not be selected (if not marked
"important") and when there's no icon, it would result in an empty button.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>
https://bugzilla.gnome.org/show_bug.cgi?id=710134

gtk/gtktoolbutton.c

index 7acfc9f00d859e349f9c8a44bfec1403037e04d1..0aeea1b497bb0d7b351b2e870fe7b5ace2745bcb 100644 (file)
@@ -421,7 +421,7 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
       need_label = TRUE;
     }
   
-  if (style == GTK_TOOLBAR_ICONS && button->priv->icon_widget == NULL &&
+  if (style != GTK_TOOLBAR_TEXT && button->priv->icon_widget == NULL &&
       button->priv->stock_id == NULL && button->priv->icon_name == NULL)
     {
       need_label = TRUE;